class HikerManager {

    spawnrate;
    spawnlast;
    spawned;
    constructor() {
        this.init();
    }

    init() {
        this.spawnrate = 80; //Update Ticks(30/sec)
        this.spawnlast = 0;
        this.spawned = 0;
    }

    update() {
        this.spawnrate--;
        if (this.spawnrate <= 0) {
            this.spawned++;

            window.game.system.spawnentity('Hiker');
            this.spawnrate = 80 - this.spawned;
            this.spawnrate = Math.max(this.spawnrate, 40);
        }
    }
} 